home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Eagles Nest BBS 8
/
Eagles_Nest_Mac_Collection_Disc_8.TOAST
/
Developer Tools⁄Additions
/
TextPertDK#1
/
MPW C Sources & Examples.image
/
Example2
/
Example2.a
< prev
next >
Wrap
Text File
|
1989-10-13
|
3KB
|
84 lines
;
; Apple Macintosh Developer Technical Support
;
; MultiFinder-Aware TextEdit Sample Application
;
; TESample
;
; TESampleGlue.a - Assembler Source
;
; Copyright © 1989 Apple Computer, Inc.
; All rights reserved.
;
; Versions:
; 1.00 08/88
; 1.01 11/88
; 1.02 04/89 MPW 3.1
;
; Components:
; TESample.p April 1, 1989
; TESample.c April 1, 1989
; TESampleGlue.a April 1, 1989
; TESample.r April 1, 1989
; TESample.h April 1, 1989
; [P]TESample.make April 1, 1989
; [C]TESample.make April 1, 1989
;
; TESample is an example application that demonstrates how
; to initialize the commonly used toolbox managers, operate
; successfully under MultiFinder, handle desk accessories and
; create, grow, and zoom windows. The fundamental TextEdit
; toolbox calls and TextEdit autoscroll are demonstrated. It
; also shows how to create and maintain scrollbar controls.
;
; It does not by any means demonstrate all the techniques you
; need for a large application. In particular, Sample does not
; cover exception handling, multiple windows/documents,
; sophisticated memory management, printing, or undo. All of
; these are vital parts of a normal full-sized application.
;
; This application is an example of the form of a Macintosh
; application; it is NOT a template. It is NOT intended to be
; used as a foundation for the next world-class, best-selling,
; 600K application. A stick figure drawing of the human body may
; be a good example of the form for a painting, but that does not
; mean it should be used as the basis for the next Mona Lisa.
;
; We recommend that you review this program or Sample before
; beginning a new application. Sample is a simple app. which doesn’t
; use TextEdit or the Control Manager.
;
;
; AsmClikLoop
;
; This routine gets called by the TextEdit Manager from TEClick.
; It calls the old, default click loop routine that scrolls the
; text, and then calls our own Pascal routine that handles
; tracking the scroll bars to follow along. It doesn't bother
; with saving registers A0 and D0, because they are trashed
; anyway by TextEdit.
;
AsmClikLoop PROC EXPORT
IMPORT GETOLDCLIKLOOP
IMPORT PASCALCLIKLOOP
MOVEM.L D1-D2/A1,-(SP) ; D0 and A0 need not be saved
CLR.L -(SP) ; make space for procedure pointer
JSR GETOLDCLIKLOOP ; get the old clikLoop
MOVEA.L (SP)+,A0 ; into A0
MOVEM.L (SP)+,D1-D2/A1 ; restore the world as it was
JSR (A0) ; and execute old clikLoop
MOVEM.L D1-D2/A1,-(SP) ; D0 and A0 need not be saved
JSR PASCALCLIKLOOP ; do our clikLoop
MOVEM.L (SP)+,D1-D2/A1 ; restore the world as it was
MOVEQ #1,D0 ; clear the zero flag so TextEdit keeps going
RTS
END